package com.fuyao.cloud.personnel.library.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.SqlCondition;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fuyao.cloud.common.biz.entity.AuditableEntity;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;


@Data
@TableName("fy_library_book")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "书籍信息")
public class Book extends AuditableEntity {
    @ExcelProperty("图书编号")
    private String bookNumber;

    @ExcelProperty("图书编码")
    private String bookCode;

    @TableField(condition = SqlCondition.LIKE)
    @ExcelProperty("图书名称")
    private String name;

    @TableField(condition = SqlCondition.LIKE)
    @ExcelProperty("作者")
    private String author;

    @ExcelProperty("出版日期")
    private String publishDate;

    @ExcelIgnore
    private Long catalogId;

    @ExcelProperty("编录号")
    @TableField(exist = false)
    private String catalogCode;

    @ExcelIgnore
    @TableField(exist = false)
    private Boolean hasBorrowHistory;

    @ExcelProperty("状态（0：在库、1：借出）")
    private Integer status;
}
